<%-- 
    Document   : adminUserAdd
    Created on : Nov 9, 2013
    Author     : Reynier Ortiz
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
      <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="shortcut icon" href="../../assets/ico/favicon.png">

        <title>GRS Admin Users</title>

        <!-- Bootstrap core CSS -->
        <link href="../libs/bootstrap/css/bootstrap.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="../../assets/js/html5shiv.js"></script>
          <script src="../../assets/js/respond.min.js"></script>
        <![endif]-->
      </head>

    <body>
        <header>
          <nav class="navbar navbar-default" role="navigation">
              <div class="navbar-header"><p class="navbar-text navbar-left">Grade Report System</p></div>
              
                <form class="" method="post" action="adminUsers" >
                    <ul class="nav navbar-nav">
                      <li class="active"><a href="#">Users</a></li>
                      <li><a href="../grs/adminCourses">Courses</a></li>
                      <li><a href="../grs/adminSections">Sections</a></li>
                    </ul>
                </form>
                <form class="navbar-form navbar-right" method="post" action="../login" >
                    <div class="form-group">Signed in as ${sessionScope.UserName}</div>
                    <button id="logout" name="logout" type="submit" class="btn btn-link">(Log out)</button>
                </form>
           
          </nav>
      </header>
        <div class="container">
            <div id="errorMessageContainer" class="alert alert-danger" style="display: none;">
                <a class="close" data-dismiss="alert" href="#">×</a><span id="errorMessage">${messages.error}</span>
            </div>
            <h2>Add or Edit User</h2>
            <p class="lead">Enter the information of the user to add or edit.</p>
            <form class="form-horizontal" role="form" method="post" action="adminUsers">
                <input type="hidden" id="inputUserId" name="inputUserId" value="${inputUserId}">
                <input type="hidden" id="inputRoleId" name="inputRoleId" value="${inputRoleId}">
                <div class="form-group">
                  <label for="inputFirstName" class="col-sm-2 control-label">First Name</label>
                  <div class="col-sm-4">
                      <input name="inputFirstName" type="text" class="form-control" id="inputFirstName" placeholder="First Name" value="${inputFirstName}">
                  </div>
                </div>
                <div class="form-group">
                  <label for="inputLastName" class="col-sm-2 control-label">Last Name</label>
                  <div class="col-sm-4">
                      <input name="inputLastName" type="text" class="form-control" id="inputLastName" placeholder="Last Name" value="${inputLastName}">
                  </div>
                </div>
                <div class="form-group">
                    <label for="inputEmail" class="col-sm-2 control-label">Email</label>
                    <div class="col-sm-4">
                        <input name="inputEmail" type="email" class="form-control" id="inputEmail" placeholder="Email" value="${inputEmail}">
                    </div>
                </div>
                <div class="form-group">
                  <label for="inputUsername" class="col-sm-2 control-label">Username</label>
                  <div class="col-sm-4">
                      <input name="inputUsername" type="text" class="form-control" id="inputUsername" placeholder="Username" value="${inputUsername}">
                  </div>
                </div>
                <div class="form-group">
                    <label id="labelPassword" for="inputPassword" class="col-sm-2 control-label">Password</label>
                    <div class="col-sm-4">
                        <input name="inputPassword" type="password" class="form-control" id="inputPassword" placeholder="Password" >
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputRole" class="col-sm-2 control-label">Role</label>
                    <div class="col-sm-4">
                        <select class="form-control" id="inputRole" name="inputRole">
                            <option value="ADMIN">Administrator</option>
                            <option value="STUD">Student</option>
                            <option value="PROF">Professor</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                  <div class="col-sm-offset-2 col-sm-4">
                    <button name="submitUser" id="submitUser" type="submit" class="btn btn-default btn-primary">Submit</button>
                    <button name="cancelSubmitUser" id="cancelSubmitUser" type="submit" class="btn btn-default">Cancel</button>
                  </div>
                </div>
          </form>

        </div>
        
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <script src="../libs/jquery/jquery-2.0.3.min.js"></script>
    <script src="../libs/bootstrap/js/bootstrap.min.js"></script>
    <script src="../scripts/adminUsersAdd.js"></script>
    <!-- Placed at the end of the document so the pages load faster -->
    </body>
</html>
